package com.houtai.eduservice.controller;

import com.houtai.commonutils.Result;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/eduservice/user")
//@CrossOrigin//解决跨域
public class EduLoginController {
    //login
    @PostMapping("login")
    public Result login(){
        return Result.ok().data("token","admin");
    }
    //info
    @GetMapping("info")
    public Result info(){
        return Result.ok().data("roles","[admin]").data("name","admin")
                .data("avatar","https://edu-ssyytoux.oss-cn-chengdu.aliyuncs.com/2022/11/15/856ae10d85aa41e38a6c64a5404448f3file.png");
    }
}
